package com.wutuo.aggragation.rollcall.enums;

/**
 * Created by Kent on 2016/4/9.
 */
public enum SignListSortType {

    SIGN("sign"), CLASS("class"), TEACHER("teacher"), LEAVE("leave");

    private String type;

    /**
     * 私有构造函数
     * @param type
     */
    SignListSortType(String type) {
        this.type = type;
    }

    /**
     * 返回枚举值的字符串值
     * @return
     */
    public String getValue() {
        return type;
    }

    public static SignListSortType get(String type) {
        SignListSortType[] values = SignListSortType.values();
        for (SignListSortType item : values) {
            if (item.getValue().equals(type)) {
                return item;
            }
        }
        return null;
    }
}
